export function currentCookie(state) {
  const current = state.currentSelectedAccount;
  return current ? current.cookie : null;
}

export function countUnread(state, ...other) {
  let num = 0;
  other[2]["persisted/accounts"].forEach((acc) => {
    if (state.serverMessageCount[acc.userid]) {
      num += parseInt(state.serverMessageCount[acc.userid]);
    }
  });
  return num;
}
